package com.easy.mapper;

import com.easy.bean.Attraction;
import com.easy.bean.Favorites;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface FavoritesDao {
    int add(@Param("param") Favorites favorites);
    int del(@Param("id") Integer id);
    int edit(@Param("param") Favorites favorites);
    Favorites one(@Param("id") Integer id);
    List<Favorites> all(@Param("param") Favorites favorites);
    int pageCount(@Param("param") Favorites favorites);
    List<Favorites> page(@Param("page") Page page, @Param("param") Favorites favorites);
    Favorites findByUserAndAttraction(@Param("userId") Integer userId, @Param("attractionId") Integer attractionId);
}
